package example.file;

import java.io.File;
import java.util.Date;

/**
 * Created by lenovo on 2016/11/4 0004.
 * file.lastModified() 方法来获取文件最后的修改时间
 */
public class ModifyTime {
    public static void main(String[] args) {
        File file = new File("Main.java");
        Long lastModified = file.lastModified();
        Date date = new Date(lastModified);
        System.out.println(date);
    }
}
